package cn.iune.erp.autoentry;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.persistence.UniqueConstraint;
import javax.persistence.Version;

import com.justep.baas.data.RowState;

//会计分录设置
@Entity
@Table(name="EntrySetting",uniqueConstraints={@UniqueConstraint(columnNames={"billType","enterpriseNo"})})
@NamedQuery(name="EntrySetting.findAll", query="SELECT s FROM EntrySetting s")
public class EntrySetting {
	
	@Id
	@Column(length=32)
	private String fID;
	
	@Column(length=4)
	private String billType;
	@Column(length=20)
	private String billTypeName;	
		
	/////////////会计设置//////////////////////
	//凭证单别
	@Column(length=4)
	private String pzbillType;
	@Column(length=20)
	private String pzbillTypeName;	
	//凭证生成方式
	private int gatherFlag = 0;//0：逐张，1：汇总
	//同单号科目汇总
	private int samenoFlag = 0;//0：否，1：是
	//借方摘要来源：单别单号，进货日期，工厂名称，备注，供应商简称，发票号码
	private int debitSummary; 	
	//贷方摘要来源
	private int creditSummary;	
	
	//存货会计科目来源（进货单）
	private int captionFrom1;	
	//存货会计科目（进货单）-----------------------应收会计科目（销售发票）
	@Column(length=10)
	private String captionNo1;//科目编码
	@Column(length=50)
	private String captionName1;//科目名称
	//应交增值税会计科目来源（进货单）
	private int captionFrom2;	
	//应交增值税会计科目（进货单）---------收入会计科目（销售发票）
	@Column(length=10)
	private String captionNo2;//科目编码
	@Column(length=50)
	private String captionName2;//科目名称
	//账款会计科目来源（进货单）
	private int captionFrom3;	
	//账款会计科目（进货单）-----------------------应交增值税会计科目（销售发票）
	@Column(length=10)
	private String captionNo3;//科目编码
	@Column(length=50)
	private String captionName3;//科目名称
	//费用会计科目来源（进货单）
	private int captionFrom4;	
	//费用会计科目（进货单）----------------------应交营业税会计科目（销售发票）
	@Column(length=10)
	private String captionNo4;//科目编码
	@Column(length=50)
	private String captionName4;//科目名称
	//预付账款会计科目来源（进货单）
	private int captionFrom5;	
	//预付账款会计科目（进货单）-------------营业税会计科目（销售发票）
	@Column(length=10)
	private String captionNo5;//科目编码
	@Column(length=50)
	private String captionName5;//科目名称
	//差异会计科目来源（进货单）
	private int captionFrom6;	
	//差异会计科目（进货单）---------------------主营业务税金及附加会计科目（销售发票）
	@Column(length=10)
	private String captionNo6;//科目编码
	@Column(length=50)
	private String captionName6;//科目名称
	
	
	
	/////////////////////////////////////////
	
	
	@Column(length=128)
	private String enterpriseNo;
	@Column(length=128)
	private String enterpriseName;
	
	@Column(length=36)
	private String userId;

	@Version
	private int version;
	
	@Transient//非持久字段
	private RowState rowState;
	public RowState getRowState() {
		return rowState;
	}
	public void setRowState(RowState rowState) {
		this.rowState = rowState;
	}

	public String getfID() {
		return this.fID;
	}

	public void setfID(String fID) {
		this.fID = fID;
	}
	public String getBillType() {
		return billType;
	}
	public void setBillType(String billType) {
		this.billType = billType;
	}
	public String getBillTypeName() {
		return billTypeName;
	}
	public void setBillTypeName(String billTypeName) {
		this.billTypeName = billTypeName;
	}
	public String getPzbillType() {
		return pzbillType;
	}
	public void setPzbillType(String pzbillType) {
		this.pzbillType = pzbillType;
	}
	public String getPzbillTypeName() {
		return pzbillTypeName;
	}
	public void setPzbillTypeName(String pzbillTypeName) {
		this.pzbillTypeName = pzbillTypeName;
	}
	public int getGatherFlag() {
		return gatherFlag;
	}
	public void setGatherFlag(int gatherFlag) {
		this.gatherFlag = gatherFlag;
	}
	public int getSamenoFlag() {
		return samenoFlag;
	}
	public void setSamenoFlag(int samenoFlag) {
		this.samenoFlag = samenoFlag;
	}
	public int getDebitSummary() {
		return debitSummary;
	}
	public void setDebitSummary(int debitSummary) {
		this.debitSummary = debitSummary;
	}
	public int getCreditSummary() {
		return creditSummary;
	}
	public void setCreditSummary(int creditSummary) {
		this.creditSummary = creditSummary;
	}
	public int getCaptionFrom1() {
		return captionFrom1;
	}
	public void setCaptionFrom1(int captionFrom1) {
		this.captionFrom1 = captionFrom1;
	}
	public String getCaptionNo1() {
		return captionNo1;
	}
	public void setCaptionNo1(String captionNo1) {
		this.captionNo1 = captionNo1;
	}
	public String getCaptionName1() {
		return captionName1;
	}
	public void setCaptionName1(String captionName1) {
		this.captionName1 = captionName1;
	}
	public int getCaptionFrom2() {
		return captionFrom2;
	}
	public void setCaptionFrom2(int captionFrom2) {
		this.captionFrom2 = captionFrom2;
	}
	public String getCaptionNo2() {
		return captionNo2;
	}
	public void setCaptionNo2(String captionNo2) {
		this.captionNo2 = captionNo2;
	}
	public String getCaptionName2() {
		return captionName2;
	}
	public void setCaptionName2(String captionName2) {
		this.captionName2 = captionName2;
	}
	public int getCaptionFrom3() {
		return captionFrom3;
	}
	public void setCaptionFrom3(int captionFrom3) {
		this.captionFrom3 = captionFrom3;
	}
	public String getCaptionNo3() {
		return captionNo3;
	}
	public void setCaptionNo3(String captionNo3) {
		this.captionNo3 = captionNo3;
	}
	public String getCaptionName3() {
		return captionName3;
	}
	public void setCaptionName3(String captionName3) {
		this.captionName3 = captionName3;
	}
	public int getCaptionFrom4() {
		return captionFrom4;
	}
	public void setCaptionFrom4(int captionFrom4) {
		this.captionFrom4 = captionFrom4;
	}
	public String getCaptionNo4() {
		return captionNo4;
	}
	public void setCaptionNo4(String captionNo4) {
		this.captionNo4 = captionNo4;
	}
	public String getCaptionName4() {
		return captionName4;
	}
	public void setCaptionName4(String captionName4) {
		this.captionName4 = captionName4;
	}
	public int getCaptionFrom5() {
		return captionFrom5;
	}
	public void setCaptionFrom5(int captionFrom5) {
		this.captionFrom5 = captionFrom5;
	}
	public String getCaptionNo5() {
		return captionNo5;
	}
	public void setCaptionNo5(String captionNo5) {
		this.captionNo5 = captionNo5;
	}
	public String getCaptionName5() {
		return captionName5;
	}
	public void setCaptionName5(String captionName5) {
		this.captionName5 = captionName5;
	}
	public int getCaptionFrom6() {
		return captionFrom6;
	}
	public void setCaptionFrom6(int captionFrom6) {
		this.captionFrom6 = captionFrom6;
	}
	public String getCaptionNo6() {
		return captionNo6;
	}
	public void setCaptionNo6(String captionNo6) {
		this.captionNo6 = captionNo6;
	}
	public String getCaptionName6() {
		return captionName6;
	}
	public void setCaptionName6(String captionName6) {
		this.captionName6 = captionName6;
	}
	public String getEnterpriseNo() {
		return enterpriseNo;
	}
	public void setEnterpriseNo(String enterpriseNo) {
		this.enterpriseNo = enterpriseNo;
	}
	public String getEnterpriseName() {
		return enterpriseName;
	}
	public void setEnterpriseName(String enterpriseName) {
		this.enterpriseName = enterpriseName;
	}
	public String getUserId() {
		return userId;
	}
	public void setUserId(String userId) {
		this.userId = userId;
	}
	public int getVersion() {
		return version;
	}
	public void setVersion(int version) {
		this.version = version;
	}
	
	
}
